package com.airy.apprepairequipment;

import com.airy.apprepairequipment.socket.SocketServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

@MapperScan("com.airy.apprepairequipment.dao")
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class})
public class ApprepairequipmentApplication extends SpringBootServletInitializer implements CommandLineRunner {

    //注意此处将要用的TCP进行调用
    @Autowired
    private SocketServer socketServer;
    //
    @Value("${fstrDeviceid}")
    private String fstrDeviceid;
    //交调url
    @Value("${jiaodiaoUrl}")
    private String jiaodiaoUrl;
    //微波url
    @Value("${weiboUrl}")
    private String weiboUrl;

    public static void main(String[] args) {
        SpringApplication.run(ApprepairequipmentApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        socketServer.aaa(fstrDeviceid,jiaodiaoUrl,weiboUrl);
    }
}
